package com.icode.core.model.house;

import com.icode.core.dto.house.ForEnumDTO;

import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: xianfei
 * Date: 15-6-11
 * Time: 上午10:35
 * To change this template use File | Settings | File Templates.
 */
public enum HouseBaseArea {

    NOT_LIMIT(""),
    XISHUANGBANNA("西双版纳"),
    SANYA("三亚"),
    SUZHOU("苏州"),
    LIJIANG("丽江"),
    SHENZHEN("深圳"),
    GUANGZHOU("广州"),
    CHENGDU("成都"),
    KUNMING("昆明");
    //name,value  label

    private String label;

    private HouseBaseArea(String label) {
        this.label = label;
    }

    public String getValue() {
        return name();
    }

    public void setValue() {

    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public static List<ForEnumDTO> toDTOs() {
        List<ForEnumDTO> forEnumDTOs = new ArrayList<>();
        for (HouseBaseArea houseBaseArea : HouseBaseArea.values()) {
            String value = houseBaseArea.name();
            String label = houseBaseArea.getLabel();
            ForEnumDTO forEnumDTO = new ForEnumDTO(value, label);
            forEnumDTOs.add(forEnumDTO);
        }
        return forEnumDTOs;
    }
}
